<template>
	<view class="shopList">
		<view class="shop acea-row">
			<view
				class="shop-item"
				v-for="(item, index) in shopList"
				:key="index"
				@click="goShop(index)"
			>
				<text class="text">{{ item.translateName }}</text>
				<view class="pic tui-skeleton-fillet">
					<easy-loadimage
						mode="scaleToFill"
						:image-src="item.pic"
					></easy-loadimage>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { toTranslateLang } from "@/utils/index.js";
export default {
	props: {
		shopList: {
			type: Array,
			default: () => [],
		},
	},
	methods: {
		goShop(i) {
			i === 0
				? uni.navigateTo({
						url: `/pages/merchant/street/index?name=${this.shopList[0].translateName}`,
				  })
				: uni.navigateTo({
						url: `/pages/promotionList/index?name=${this.shopList[1].translateName}`,
				  });
		},
		menusTap(url) {
			uni.navigateTo({
				url,
			});
		},
	},
};
</script>

<style lang="scss" scoped>
.shopList {
	margin-top: 24rpx;
	background-color: #fff;
	padding: 15rpx 24rpx;
	border-radius: 10rpx;
	.shop {
		display: grid;
		grid-column-gap: 24rpx;
		grid-template-columns: repeat(2, 1fr);
	}

	.shop-item {
		background: #f2f3f6;
		height: 160rpx;
		border-radius: 10rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 15rpx 24rpx;

		.text {
			color: #30303c;
		}

		.pic {
			width: 108rpx;
			height: 114rpx;

			image,
			uni-image > div,
			uni-image > img {
				width: 100%;
				height: 100%;
			}

			.pic1 {
				border-radius: 20rpx;
				overflow: hidden;
			}

			.pic2 {
				border-radius: 20rpx;
				overflow: hidden;
			}
		}
	}
}

.firstNewswiper {
	margin: 0 auto 30rpx auto;
	width: 640rpx;

	swiper,
	.swiper-item {
		width: 640rpx;
		height: 780rpx;
	}

	image {
		width: 640rpx;
		height: 780rpx;
	}
}
</style>
